239. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-03-13 03:01:07 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

239.1 Files compared

#LocationFileLast Modified
1Porto v4.0.4/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproductsgrid.phtml2021-03-27 08:06:20 +0000
2Porto v4.0.5/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproductsgrid.phtml2023-01-06 03:03:21 +0000

239.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged5738
Changed317
Inserted00
Removed11

239.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

239.4 Active regular expressions

No regular expressions were active.

239.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2015 Magento. All rights reserved. 3  * Copyright © 2015 Magento. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6 use Magento\Framework\App\Action\Action; 6 use Magento\Framework\App\Action\Action;
7  7 
8 // @codingStandardsIgnoreFile 8 // @codingStandardsIgnoreFile
9 ?> 9 ?>
10 <?php 10 <?php
11 /** 11 /**
12  * Product list template 12  * Product list template
13  * 13  *
14  * @var $block \Smartwave\Filterproducts\Block\ 14  * @var $block \Smartwave\Filterproducts\Block\
15  */ 15  */
16 ?> 16 ?>
17 <?php 17 <?php
18 $_productCollection = $block->getLoadedProductCollection(); 18 $_productCollection = $block->getLoadedProductCollection();
19 $_helper = $this->helper('Magento\Catalog\Helper\Output'); 19 $_helper = $this->helper('Magento\Catalog\Helper\Output');
20 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); 20 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
21 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 21 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
22 $_category_config = $_portohelper->getConfig('porto_settings/category'); 22 $_category_config = $_portohelper->getConfig('porto_settings/category');
23 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 23 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
24 $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label'); 24 $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label');
25  25 
26 $aspect_ratio = $this->getData("aspect_ratio"); 26 $aspect_ratio = $this->getData("aspect_ratio");
27 if($aspect_ratio == null) { 27 if($aspect_ratio == null) {
28     $aspect_ratio = $_category_config['aspect_ratio']; 28     $aspect_ratio = $_category_config['aspect_ratio'];
29 } 29 }
30 $image_width = $this->getData("image_width"); 30 $image_width = $this->getData("image_width");
31 if(!$image_width) { 31 if(!$image_width) {
32     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 32     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
33 } 33 }
34 $image_height = $this->getData("image_height"); 34 $image_height = $this->getData("image_height");
35 if(!$image_height) { 35 if(!$image_height) {
36     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; 36     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
37 } 37 }
38 $column_count = $this->getData("column_count"); 38 $column_count = $this->getData("column_count");
39 if($column_count == null) { 39 if($column_count == null) {
40     $column_count = 4; 40     $column_count = 4;
41 } 41 }
42 $product_count = $this->getData("product_count"); 42 $product_count = $this->getData("product_count");
43 $category_id = $this->getData("category_id"); 43 $category_id = $this->getData("category_id");
44 $product_type = $_category_grid_config['product_type']; 44 $product_type = $_category_grid_config['product_type'];
45 if($product_type == null) { 45 if($product_type == null) {
46     $product_type = 1; 46     $product_type = 1;
47 } 47 }
48 ?> 48 ?>
49 <?php if (!$_productCollection->count()): ?> 49 <?php if (!$_productCollection->count()): ?>
50     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 50     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
51 <?php else: ?> 51 <?php else: ?>
52     <?php 52     <?php
53     $viewMode = 'grid'; 53     $viewMode = 'grid';
54     $image = 'category_page_grid'; 54     $image = 'category_page_grid';
55     $hover_image = 'category_page_grid-hover'; 55     $hover_image = 'category_page_grid-hover';
56     $showDescription = false; 56     $showDescription = false;
57     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 57     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
58     ?> 58     ?>
59     <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> 59     <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>">
60         <?php $iterator = 1; ?> 60         <?php $iterator = 1; ?>
61         <ol class="filterproducts products list items product-items"> 61         <ol class="filterproducts products list items product-items">
62             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 62             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
63             <?php foreach ($_productCollection as $_product): ?> 63             <?php foreach ($_productCollection as $_product): ?>
64                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> 64                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
65                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 65                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
66                     <?php // Product Image ?> 66                     <?php // Product Image ?>
67                     <div class="product photo product-item-photo"> 67                     <div class="product photo product-item-photo">
68                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 68                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
69                         <?php 69                         <?php
70                             if($aspect_ratio) 70                             if($aspect_ratio)
71                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 71                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
72                             else 72                             else
73                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 73                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
74                             $productImageUrl = $productImage->getUrl(); 74                             $productImageUrl = $productImage->getUrl();
75                         ?> 75                         ?>
76                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/> 76                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/>
77                         <?php if($_category_config['alternative_image']): ?> 77                         <?php if($_category_config['alternative_image']): ?>
78                         <?php 78                         <?php
79                             if($aspect_ratio) 79                             if($aspect_ratio)
80                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 80                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
81                             else 81                             else
82                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 82                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
83                             $productHoverImageUrl = $productHoverImage->getUrl(); 83                             $productHoverImageUrl = $productHoverImage->getUrl();
84                         ?> 84                         ?>
85                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 85                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
86                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/> 86                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/>
87                             <?php endif; ?> 87                             <?php endif; ?>
88                         <?php endif; ?> 88                         <?php endif; ?>
89                         </a> 89                         </a>
90                         <?php 90                         <?php
91                             $product_label = ""; 91                             $product_label = "";
92                             if($_product_label_config['sale_label']) { 92                             if($_product_label_config['sale_label']) {
93                                 $orgprice = $_product->getPrice(); 93                                 if ($percentage = $_portohelper->getPercentage($_product)) {
94                                 $specialprice = $_product->getSpecialPrice();    
95                                 $specialfromdate = $_product->getSpecialFromDate();    
96                                 $specialtodate = $_product->getSpecialToDate();    
97                                 $today = time();    
98                                 if(!$specialprice)    
99                                     $specialprice = $orgprice;    
100                                 if($specialprice < $orgprice) {    
101                                     if((is_null($specialfromdate) && is_null($specialtodate)) || ($today >= strtotime($specialfromdate) && is_null($specialtodate)) || ($today <= strtotime($specialtodate) && is_null($specialfromdate)) || ($today >= strtotime($specialfromdate) && $today <= strtotime($specialtodate))){    
102                                         if($_product_label_config['sale_label_percent']) { 94                                     if($_product_label_config['sale_label_percent']) {
103                                             $save_percent = 100-round(($specialprice/$orgprice)*100); 95                                         $product_label .= '<div class="product-label sale-label">'.
$percentage.'%'.'</div>';
104                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>';    
105                                         } else { 96                                     } else {
106                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 97                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
107                                         } 98                                     }
108                                     } 99                                 }
109                                 } 100                             }
110                             }    
111                             if($_product_label_config['new_label']) { 101                             if($_product_label_config['new_label']) {
112                                 $now = date("Y-m-d"); 102                                 $now = date("Y-m-d");
113                                 $newsFrom= substr($_product->getData('news_from_date')
,0,10);
 103                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10);
114                                 $newsTo=  substr($_product->getData('news_to_date')
,0,10);
 104                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10);
115  105 
116                                 if ($newsTo != '' || $newsFrom != ''){ 106                                 if ($newsTo != '' || $newsFrom != ''){
117                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 107                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
118                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 108                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
119                                     } 109                                     }
120                                 } 110                                 }
121                             } 111                             }
122                             if($product_label) 112                             if($product_label)
123                                 echo '<div class="product-labels">'.$product_label.'</div>'; 113                                 echo '<div class="product-labels">'.$product_label.'</div>';
124                         ?> 114                         ?>
125                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?> 115                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?>
126                         <div class="product-item-inner"> 116                         <div class="product-item-inner">
127                             <div class="product actions product-item-actions"> 117                             <div class="product actions product-item-actions">
128                                 <div class="actions-primary"> 118                                 <div class="actions-primary">
129                                     <?php if ($_product->isSaleable()): ?> 119                                     <?php if ($_product->isSaleable()): ?>
130                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 120                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
131                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 121                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
132                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 122                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
133                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 123                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
134  124 
135                                             <?php echo $block->getBlockHtml('formkey')?> 125                                             <?php echo $block->getBlockHtml('formkey')?>
136                                             <button type="submit" 126                                             <button type="submit"
137                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 127                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
138                                                     class="action tocart primary"> 128                                                     class="action tocart primary">
139                                                 <span><?php echo __('Add to Cart') ?></span> 129                                                 <span><?php echo __('Add to Cart') ?></span>
140                                             </button> 130                                             </button>
141                                         </form> 131                                         </form>
142                                     <?php else: ?> 132                                     <?php else: ?>
143                                         <?php if ($_product->getIsSalable()): ?> 133                                         <?php if ($_product->getIsSalable()): ?>
144                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 134                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
145                                         <?php else: ?> 135                                         <?php else: ?>
146                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 136                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
147                                         <?php endif; ?> 137                                         <?php endif; ?>
148                                     <?php endif; ?> 138                                     <?php endif; ?>
149                                 </div> 139                                 </div>
150                                 <?php if ($block->getMode() == 'grid'): ?> 140                                 <?php if ($block->getMode() == 'grid'): ?>
151                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 141                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
152                                     <a href="#" 142                                     <a href="#"
153                                        class="action towishlist actions-secondary" 143                                        class="action towishlist actions-secondary"
154                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 144                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
155                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 145                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
156                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 146                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
157                                        data-action="add-to-wishlist" 147                                        data-action="add-to-wishlist"
158                                        role="button"> 148                                        role="button">
159                                         <span><?php echo __('Add to Wish List') ?></span> 149                                         <span><?php echo __('Add to Wish List') ?></span>
160                                     </a> 150                                     </a>
161                                 <?php endif; ?> 151                                 <?php endif; ?>
162                                 <?php endif; ?> 152                                 <?php endif; ?>
163                                 <?php if($_category_config['addtocompare']): ?> 153                                 <?php if($_category_config['addtocompare']): ?>
164                                 <?php 154                                 <?php
165                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 155                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
166                                 ?> 156                                 ?>
167                                 <a href="#" 157                                 <a href="#"
168                                    class="action tocompare actions-secondary" 158                                    class="action tocompare actions-secondary"
169                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 159                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
170                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 160                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
171                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 161                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
172                                    role="button"> 162                                    role="button">
173                                     <span><?php echo __('Add to Compare') ?></span> 163                                     <span><?php echo __('Add to Compare') ?></span>
174                                 </a> 164                                 </a>
175                                 <?php endif; ?> 165                                 <?php endif; ?>
176                             </div> 166                             </div>
177                         </div> 167                         </div>
178                         <?php endif; ?> 168                         <?php endif; ?>
179                     </div> 169                     </div>
180                     <div class="product details product-item-details"> 170                     <div class="product details product-item-details">
181                         <?php 171                         <?php
182                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 172                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
183                         ?> 173                         ?>
184                         <strong class="product name product-item-name"> 174                         <strong class="product name product-item-name">
185                             <a class="product-item-link" 175                             <a class="product-item-link"
186                                href="<?php echo $_product->getProductUrl() ?>"> 176                                href="<?php echo $_product->getProductUrl() ?>">
187                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 177                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
188                             </a> 178                             </a>
189                         </strong> 179                         </strong>
190                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?> 180                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?>
191                         <?php if($_category_config['rating_star']): ?> 181                         <?php if($_category_config['rating_star']): ?>
192                         <?php 182                         <?php
193                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 183                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
194                         ?> 184                         ?>
195                         <?php if($review_html): ?> 185                         <?php if($review_html): ?>
196                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 186                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
197                         <?php else: ?> 187                         <?php else: ?>
198                         <div class="product-reviews-summary short"> 188                         <div class="product-reviews-summary short">
199                             <div class="rating-summary"> 189                             <div class="rating-summary">
200                                 <span class="label"><span>Rating:</span></span> 190                                 <span class="label"><span>Rating:</span></span>
201                                 <div class="rating-result" title="0%"> 191                                 <div class="rating-result" title="0%">
202                                     <span style="width:0"><span>0%</span></span> 192                                     <span style="width:0"><span>0%</span></span>
203                                 </div> 193                                 </div>
204                             </div> 194                             </div>
205                         </div> 195                         </div>
206                         <?php endif; ?> 196                         <?php endif; ?>
207                         <?php endif; ?> 197                         <?php endif; ?>
208                         <?php if ($showDescription):?> 198                         <?php if ($showDescription):?>
209                             <div class="product description product-item-description"> 199                             <div class="product description product-item-description">
210                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> 200                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
211                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" 201                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
212                                    class="action more"><?php echo __('Learn More') ?></a> 202                                    class="action more"><?php echo __('Learn More') ?></a>
213                             </div> 203                             </div>
214                         <?php endif; ?> 204                         <?php endif; ?>
215                         <?php if($_category_config['product_price']): ?> 205                         <?php if($_category_config['product_price']): ?>
216                         <?php echo $block->getProductPrice($_product) ?> 206                         <?php echo $block->getProductPrice($_product) ?>
217                         <?php endif; ?> 207                         <?php endif; ?>
218                         <?php echo $block->getProductDetailsHtml($_product); ?> 208                         <?php echo $block->getProductDetailsHtml($_product); ?>
219  209 
220                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> 210                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?>
221                         <div class="product-item-inner"> 211                         <div class="product-item-inner">
222                             <div class="product actions product-item-actions"> 212                             <div class="product actions product-item-actions">
223                                 <?php if ($block->getMode() == 'grid'): ?> 213                                 <?php if ($block->getMode() == 'grid'): ?>
224                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> 214                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
225                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 215                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
226                                     <a href="#" 216                                     <a href="#"
227                                        class="action towishlist actions-secondary" 217                                        class="action towishlist actions-secondary"
228                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 218                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
229                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 219                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
230                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 220                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
231                                        data-action="add-to-wishlist" 221                                        data-action="add-to-wishlist"
232                                        role="button"> 222                                        role="button">
233                                         <span><?php echo __('Add to Wish List') ?></span> 223                                         <span><?php echo __('Add to Wish List') ?></span>
234                                     </a> 224                                     </a>
235                                 <?php endif; ?> 225                                 <?php endif; ?>
236                                 <?php endif; ?> 226                                 <?php endif; ?>
237                                 <?php endif; ?> 227                                 <?php endif; ?>
238                                 <div class="actions-primary"> 228                                 <div class="actions-primary">
239                                     <?php if ($_product->isSaleable()): ?> 229                                     <?php if ($_product->isSaleable()): ?>
240                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 230                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
241                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 231                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
242                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 232                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
243                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 233                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
244                                             <?php if($product_type == 10):?> 234                                             <?php if($product_type == 10):?>
245                                                 <div class="qty-box"> 235                                                 <div class="qty-box">
246                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> 236                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
247                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> 237                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
248                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> 238                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
249                                                 </div> 239                                                 </div>
250                                             <?php endif;?> 240                                             <?php endif;?>
251                                             <?php echo $block->getBlockHtml('formkey')?> 241                                             <?php echo $block->getBlockHtml('formkey')?>
252                                             <button type="submit" 242                                             <button type="submit"
253                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 243                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
254                                                     class="action tocart primary"> 244                                                     class="action tocart primary">
255                                                 <span><?php echo __('Add to Cart') ?></span> 245                                                 <span><?php echo __('Add to Cart') ?></span>
256                                             </button> 246                                             </button>
257                                         </form> 247                                         </form>
258                                     <?php else: ?> 248                                     <?php else: ?>
259                                         <?php if ($_product->getIsSalable()): ?> 249                                         <?php if ($_product->getIsSalable()): ?>
260                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 250                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
261                                         <?php else: ?> 251                                         <?php else: ?>
262                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 252                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
263                                         <?php endif; ?> 253                                         <?php endif; ?>
264                                     <?php endif; ?> 254                                     <?php endif; ?>
265                                 </div> 255                                 </div>
266                                 <?php if ($block->getMode() == 'grid'): ?> 256                                 <?php if ($block->getMode() == 'grid'): ?>
267                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> 257                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
268                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 258                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
269                                     <a href="#" 259                                     <a href="#"
270                                        class="action towishlist actions-secondary" 260                                        class="action towishlist actions-secondary"
271                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 261                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
272                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 262                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
273                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 263                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
274                                        data-action="add-to-wishlist" 264                                        data-action="add-to-wishlist"
275                                        role="button"> 265                                        role="button">
276                                         <span><?php echo __('Add to Wish List') ?></span> 266                                         <span><?php echo __('Add to Wish List') ?></span>
277                                     </a> 267                                     </a>
278                                 <?php endif; ?> 268                                 <?php endif; ?>
279                                 <?php endif; ?> 269                                 <?php endif; ?>
280                                 <?php endif; ?> 270                                 <?php endif; ?>
281                                 <?php if($_category_config['addtocompare']): ?> 271                                 <?php if($_category_config['addtocompare']): ?>
282                                 <?php 272                                 <?php
283                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 273                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
284                                 ?> 274                                 ?>
285                                 <a href="#" 275                                 <a href="#"
286                                    class="action tocompare actions-secondary" 276                                    class="action tocompare actions-secondary"
287                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 277                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
288                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 278                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
289                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 279                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
290                                    role="button"> 280                                    role="button">
291                                     <span><?php echo __('Add to Compare') ?></span> 281                                     <span><?php echo __('Add to Compare') ?></span>
292                                 </a> 282                                 </a>
293                                 <?php endif; ?> 283                                 <?php endif; ?>
294                             </div> 284                             </div>
295                         </div> 285                         </div>
296                         <?php endif; ?> 286                         <?php endif; ?>
297                     </div> 287                     </div>
298                 </div> 288                 </div>
299                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> 289                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?>
300             <?php endforeach; ?> 290             <?php endforeach; ?>
301         </ol> 291         </ol>
302         <div style="clear:both;"></div> 292         <div style="clear:both;"></div>
303         <?php if($product_count == count($_productCollection)): ?> 293         <?php if($product_count == count($_productCollection)): ?>
304         <div class="load-more-area"> 294         <div class="load-more-area">
305             <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p> 295             <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p>
306             <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a> 296             <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a>
307         </div> 297         </div>
308         <?php endif; ?> 298         <?php endif; ?>
309     </div> 299     </div>
310     <script type="text/javascript"> 300     <script type="text/javascript">
311         require([ 301         require([
312             'jquery' 302             'jquery'
313         ], function ($) { 303         ], function ($) {
314             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n'); 304             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n');
315             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); 305             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');
316             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n'); 306             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n');
317             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); 307             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');
318             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n'); 308             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n');
319             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); 309             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');
320             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n'); 310             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n');
321             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); 311             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');
322             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n'); 312             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n');
323             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); 313             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');
324             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n'); 314             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n');
325             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); 315             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');
326             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n'); 316             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n');
327             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); 317             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');
328  318 
329             $('.load-more-area > a').off("click").on("click", function(){ 319             $('.load-more-area > a').off("click").on("click", function(){
330                 url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; 320                 url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>";
331                 cat_id = $(this).attr("cat_id"); 321                 cat_id = $(this).attr("cat_id");
332  322 
333                 $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn(); 323                 $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn();
334  324 
335                 $.ajax({ 325                 $.ajax({
336                     method:"POST", 326                     method:"POST",
337                     url:url, 327                     url:url,
338                     data:{ 328                     data:{
339                         aspect_ratio:"<?php echo $aspect_ratio; ?>", 329                         aspect_ratio:"<?php echo $aspect_ratio; ?>",
340                         image_width:"<?php echo $image_width; ?>", 330                         image_width:"<?php echo $image_width; ?>",
341                         image_height:"<?php echo $image_height; ?>", 331                         image_height:"<?php echo $image_height; ?>",
342                         product_count:"<?php echo $product_count+$column_count; ?>", 332                         product_count:"<?php echo $product_count+$column_count; ?>",
343                         columns:"<?php echo $column_count; ?>", 333                         columns:"<?php echo $column_count; ?>",
344                         category_id:cat_id 334                         category_id:cat_id
345                     }, 335                     },
346                     dataType: 'json' 336                     dataType: 'json'
347                 }).done(function(data){ 337                 }).done(function(data){
348                     $(".ajax-products > .category-detail > .products-area").html(data.result); 338                     $(".ajax-products > .category-detail > .products-area").html(data.result);
349                     if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) { 339                     if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) {
350                         $("form[data-role=tocart-form]").catalogAddToCart(); 340                         $("form[data-role=tocart-form]").catalogAddToCart();
351                     } 341                     }
352                 }).fail(function(){ 342                 }).fail(function(){
353  343 
354                 }).always(function(){ 344                 }).always(function(){
355                     $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); 345                     $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut();
356                     if(typeof enable_quickview != 'undefined' && enable_quickview == true) { 346                     if(typeof enable_quickview != 'undefined' && enable_quickview == true) {
357                         requirejs(['jquery', 'weltpixel_quickview' ], 347                         requirejs(['jquery', 'weltpixel_quickview' ],
358                         function   ($, quickview) { 348                         function   ($, quickview) {
359                             $('.weltpixel-quickview').off('click').on('click', function() { 349                             $('.weltpixel-quickview').off('click').on('click', function() {
360                                 var prodUrl = $(this).attr('data-quickview-url'); 350                                 var prodUrl = $(this).attr('data-quickview-url');
361                                 if (prodUrl.length) { 351                                 if (prodUrl.length) {
362                                     quickview.displayContent(prodUrl); 352                                     quickview.displayContent(prodUrl);
363                                 } 353                                 }
364                             }); 354                             });
365                             $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ 355                             $(".ajax-products .products-grid .weltpixel-quickview").each(function(){
366                                 $(this).appendTo($(this).parent().parent().children(".product-item-photo")); 356                                 $(this).appendTo($(this).parent().parent().children(".product-item-photo"));
367                             }); 357                             });
368                         }); 358                         });
369                     } 359                     }
370                 }); 360                 });
371             }); 361             });
372         }); 362         });
373     </script> 363     </script>
374     <?php if (!$block->isRedirectToCartEnabled()) : ?> 364     <?php if (!$block->isRedirectToCartEnabled()) : ?>
375         <script type="text/x-magento-init"> 365         <script type="text/x-magento-init">
376         { 366         {
377             "[data-role=tocart-form], .form.map.checkout": { 367             "[data-role=tocart-form], .form.map.checkout": {
378                 "catalogAddToCart": {} 368                 "catalogAddToCart": {}
379             } 369             }
380         } 370         }
381         </script> 371         </script>
382     <?php endif; ?> 372     <?php endif; ?>
383 <?php endif; ?> 373 <?php endif; ?>